<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<link rel="shortcut icon" href="../static/favicon.ico" th:href="@{favicon.ico}"/>
	<th:block th:include="include :: header('新增商品分类')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-goods-add">
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">产品名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="goodsName" id="goodsName" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">产品类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="goodsTitle" id="goodsTitle" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">图片：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="goodsImg" id="goodsImg" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">产品明显：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="goodsDetail" id="goodsDetail" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">价格：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="goodsPrice" id="goodsPrice" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">库存：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="goodsStock" id="goodsStock" required>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "skgoods";
		function submitHandler() {
			if ($.validate.form()) {
				$.operate.save(prefix + "/insert", $('#form-goods-add').serialize());
			}
		}
		function doSubmit(index, layero){
			var body = layer.getChildFrame('body', index);
			$("#treeId").val(body.find('#treeId').val());
			$("#treeName").val(body.find('#treeName').val());
			layer.close(index);
		}
	</script>
</body>
</html>
